package com.hai.test.ui.base;

import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

/**
 * fileDesc
 * Created by huanghp on 2019/8/9.
 * Email h1132760021@sina.com
 */
public class BaseActivity extends AppCompatActivity {
    private static final String TAG = "BaseActivity";

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void onResume() {
        super.onResume();
//        showDisplayMetrics();
    }

    public void showDisplayMetrics() {
        DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
        Log.e(TAG, "displayMetrics.widthPixels=" + displayMetrics.widthPixels);
        Log.e(TAG, "displayMetrics.heightPixels=" + displayMetrics.heightPixels);
        Log.e(TAG, "displayMetrics.density=" + displayMetrics.density);
        Log.e(TAG, "displayMetrics.densityDpi=" + displayMetrics.densityDpi);
    }

}
